<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Edit ProductType</title>
<script>
	$(document).ready(function(){
	    $("table tbody tr:even").addClass("tdbgcolor1"); 
	    $("table tbody tr:odd").addClass("tdbgcolor2"); 
	});
	function checkAndSubmit(){
		var form = document.getElementById("updateProductForm");
		form.submit();
	}
	function showUploadWindow(id){
		var InfoW=620;
		var InfoH=400;
		var InfoUrl="edit/insert_images.action?uploadFolder=<%=com.windfone.common.Constant.UPLOAD_PRODUCT %>";
		var str=window.showModalDialog(InfoUrl,"","dialogWidth="+InfoW+"px;dialogHeight="+InfoH+"px;center=yes;help=no;resizable=no;status=no;scroll=no");
		if ( str != undefined){
			$("#"+id).val(str);
			$("#"+id+"1").attr("src","<%=contextPath%>/"+str);
		}
	}	
</script>
</head>
<body>
 
 
<div align="center">编辑手机</div>
<form method="post" action="updateProduct.action" id="updateProductForm">
<table width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF" align="center">
	<tr>
		<td width="18%">手机类型:</td>
		<td width="82%">
			<s:select list="productTypeList"  listValue="typeName" listKey="id"  name="productTypeId"  id="productTypeId"  value="bean.productTypeId"></s:select>
	  </td>
	</tr>
	<tr>
		<td>名称:</td>
		<td><input name="name" type="text" id="name"  value="<s:property value='bean.name'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>价格:</td>
		<td><input name="priceStr" type="text" id="priceStr" value="<s:property value='bean.price'/>"  size="50" maxlength="10"/></td>
	</tr>
	<tr>
		<td>上市时间:</td>
		<td><input name="marketTime" type="text" id="marketTime" value="<s:property value='bean.marketTime'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>手机制式:</td>
		<td><input name="mobileFormat" type="text" id="mobileFormat" value="<s:property value='bean.mobileFormat'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>手机频段:</td>
		<td><input name="mobilePhase" type="text" id="mobilePhase" value="<s:property value='bean.mobilePhase'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>手机外形:</td>
		<td><input name="phoneShape" type="text" id="phoneShape" value="<s:property value='bean.phoneShape'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>主屏尺寸:</td>
		<td><input name="screenSize" type="text" id="screenSize" value="<s:property value='bean.screenSize'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>主屏材质:</td>
		<td><input name="screenObject" type="text" id="screenObject" value="<s:property value='bean.screenObject'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>主屏色彩:</td>
		<td><input name="screenColor" type="text" id="screenColor" value="<s:property value='bean.screenColor'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>主屏参数:</td>
		<td><input name="screenParam" type="text" id="screenParam" value="<s:property value='bean.screenParam'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>CPU:</td>
		<td><input name="cpu" type="text" id="cpu" value="<s:property value='bean.cpu'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>内存容量:</td>
		<td><input name="memory" type="text" id="memory"  value="<s:property value='bean.memory'/>" size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>GPS定位系统:</td>
		<td><input name="gps" type="text" id="gps" value="<s:property value='bean.gps'/>"  size="50" maxlength="25"/></td>
	</tr>	
	<tr>
		<td>操作系统:</td>
		<td><input name="system" type="text" id="system" value="<s:property value='bean.system'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>标准配置:</td>
		<td><input name="standard" type="text" id="standard" value="<s:property value='bean.standard'/>"  size="50" maxlength="50"/></td>
	</tr>
	<tr>
		<td>通话时间:</td>
		<td><input name="talkTime" type="text" id="talkTime" value="<s:property value='bean.talkTime'/>"  size="50" maxlength="2"/></td>
	</tr>
	<tr>
		<td>待机时间:</td>
		<td><input name="waitTime" type="text" id="waitTime" value="<s:property value='bean.waitTime'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>外壳颜色:</td>
		<td><input name="shapeColor" type="text" id="shapeColor" value="<s:property value='bean.shapeColor'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>尺寸:</td>
		<td><input name="shapeSize" type="text" id="shapeSize" value="<s:property value='bean.shapeSize'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>重量:</td>
		<td><input name="weight" type="text" id="weight" value="<s:property value='bean.weight'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>服务:</td>
		<td><input name="service" type="text" id="service" value="<s:property value='bean.service'/>"  size="50" maxlength="25"/></td>
	</tr>
	<tr>
		<td>顺序:</td>
		<td><input type="text" name="pointSeq" id="pointSeq" size="50" value="<s:property value='bean.pointSeq'/>"/>*必须是数字</td>
	</tr>
	<tr>
		<td>语言:</td>
		<td><select name="langId" id="langId">
			<option value="0" <s:if test='bean.langId==0'>selected</s:if> >简体</option>
			<option value="1" <s:if test='bean.langId==1'>selected</s:if> >繁体</option>
			<option value="2" <s:if test='bean.langId==2'>selected</s:if> >英语</option>
		</select></td>
	</tr>
	<tr>
		<td >手机图片(小图):</td>
	  	<td  nowrap="nowrap">
				<img src="<%=contextPath%>/<s:property value='bean.imagepath'/>"  id="imagepath1" name="imagepath1" border="0"/> &nbsp; <input type="button" value="照片"  onClick="showUploadWindow('imagepath')"/>(70*90)
		</td>
	</tr>		
	<tr>
		<td >手机图片(大图):</td>
	  	<td  nowrap="nowrap">
				<img src="<%=contextPath%>/<s:property value='bean.bigImagepath'/>"  id="bigImagepath1" name="bigImagepath1" border="0"/> &nbsp; <input type="button" value="照片"  onClick="showUploadWindow('bigImagepath')"/>(250*250)
		</td>
	</tr>		
	<tr>

		<td colspan="2">
			<input type="hidden" name="imagepath" id="imagepath" value="<s:property value='bean.imagepath'/>"/>
			<input type="hidden" name="bigImagepath" id="bigImagepath" value="<s:property value='bean.bigImagepath'/>"/>
			<inut type="hidden" id="productId" name="productId" value="<s:property value='bean.id'/>" />
			<input type="button" value="Save"  onclick="checkAndSubmit()"/>&nbsp;
			<input	type="button" value="reset" />&nbsp;
			<input	type="button" value="返回"  onclick="javascript:window.history.back();" />
		</td>
</table>
</form>
</body>
</html>
